import request from '@/utils/request'

// 查询审核列表
export function listApply(query) {
  return request({
    url: '/work/approve/list',
    method: 'get',
    params: query
  })
}

// 查询报名详细
export function getApply(id) {
  return request({
    url: '/work/apply/' + id,
    method: 'get'
  })
}

// 新增报名
export function addApply(data) {
  return request({
    url: '/system/apply',
    method: 'post',
    data: data
  })
}

// 修改报名
export function updateApply(data) {
  return request({
    url: '/work/apply/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除报名
export function delApply(id) {
  return request({
    url: '/system/apply/' + id,
    method: 'delete'
  })
}
//获取比赛列表
export function listplay(query) {
  return request({
    url: '/work/competition/list',
    method: 'get',
    params: query
  })
}
// 审核提交
export function submit(query) {
  return request({
    url: '/work/approve/submitApprove',
    method: 'get',
    params: query
  })
}
//修该状态
export function updateStatus(id, status) {
  return request({
    url: '/work/approve/updateStatus',
    method: 'get',
    params: { "id": id, "status": status }
  })
}

// 查询报名列表
export function listApplyInfo(query) {
  return request({
    url: '/work/apply/list',
    method: 'get',
    params: query
  })
}
// 删除报名
export function delApplyInfo(id) {
  return request({
    url: '/work/apply/delete-by-id',
    method: 'get',
    params: { "id": id }
  })
}
export function delApplyInfos(ids) {
  return request({
    url: '/work/apply/delete-by-ids',
    method: 'get',
    params: { "ids": ids }
  })
}
